home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip: Special XP & Vista
/
Chip Spesial XP & Vista.iso
/
3_Gadgets
/
Remind_Me_Gadget
/
Remind_Me.gg
/
main.js
< prev
next >
Wrap
Text File
|
2007-12-02
|
857b
|
35 lines
var set_time = new Date();
var set_message;
var mydate;
var check = false;
var AUDIO_CLIP_URI = "alarm.wav";
function view_onOpen() {
view.setInterval("showtime()", 1000);
showtime();
}
function showtime() {
mydate = new Date();
curtime.innerText = mydate.toLocaleString();
if(check) {
if(mydate.toGMTString() == set_time.toGMTString()){
check = false;
set_timer_text.innerText = "Set"
curAudioClip_ = framework.audio.play(AUDIO_CLIP_URI, onAudioStateChange);
alert(set_message);
curAudioClip_.stop();
curAudioClip_ = null;
}
}
}
function settimefunc(){
var timer = new Date().getTime();
check = true;
set_time.setTime(timer + (parseInt(minutes.value) * 60000));
set_message = message.value;
set_timer_text.innerText = "Time Is Set"
}
function onAudioStateChange(audioClip, state) {}